import instance  from "../utils/request";

export async function getRegionDetailByRegionId(regionId){
    try {
        const res = await instance({
            url: `/Region/detail/${regionId}`,
            method: 'get',
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}

export async function getCities(parentId, pageNumber, pageSize){
    try {
        const res = await instance({
            url: `/Region/cities/${parentId}`,
            method: 'get',
            params: {
                pageNumber: pageNumber,
                pageSize: pageSize
            }
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}